import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        System.out.println("输入一个整数：");
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        while(n != 0){
            System.out.println(n%10);
            n /= 10;
        }
    }
}